package network.config;

import java.net.InterfaceAddress;
import java.util.ArrayList;
import java.util.EnumMap;
import java.util.Set;

import network.config.NetworkConfiguration.PortType;
import network.config.NetworkConfiguration.Protocol;
import network.config.NetworkConfiguration.FeatureType;

public interface NetworkConfigObserver {

	/**
	 * Call when the current protocol is changed.
	 * 
	 * @param newProtocol The new Protocol
	 * @param ports Map of the ports for the new protocol
	 * @param unsupportedFeatures Information about unsupported features in the new protocol
	 */
	public void protocolChanged (Protocol newProtocol, EnumMap <PortType, Integer> ports, ArrayList <FeatureType> unsupportedFeatures) ;
	
	/**
	 * Call when a port is changed in the specified protocol
	 * 
	 * @param protocol The protocol for which a port has changed
	 * @param portType The port that changed
	 * @param port The new value
	 */
	public void portChanged (Protocol protocol, PortType portType, int port) ;
	
	/**
	 * Call when a change happened on interface addresses choices
	 * 
	 * @param interfaceAddresses The new allowed interface addresses
	 */
	public void interfacesChanged (Set <InterfaceAddress> interfaceAddresses) ;
}
